package com.ntschy.bt.entity.dto;

import com.ntschy.bt.entity.enums.BtSupplyShopExamineResultEnum;
import com.ntschy.bt.entity.enums.BtSupplyShopShelfEnum;
import com.ntschy.bt.entity.enums.BtSupplyShopStatusEnum;
import com.ntschy.bt.entity.enums.BtSupplyShopTypeEnum;
import com.ntschy.bt.entity.valid.BtSupplyShopGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author cm
 */
@Data
@ApiModel(description = "供需超市新增更新dto")
public class BtSupplyShopAddUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "供需超市ID")
    @NotBlank(message = "供需超市ID不能为空", groups = BtSupplyShopGroups.Update.class)
    @Length(min = 36, max = 36, message = "供需超市ID长度不合法", groups = BtSupplyShopGroups.Update.class)
    private String id;

    /**
     * 供需类型 1-厂房出租 2-委托加工 3-产品供求 4-楼宇信息
     */
    @ApiModelProperty(value = "供需类型 1-厂房出租 2-委托加工 3-产品供求 4-楼宇信息")
    @NotNull(message = "供需类型不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private BtSupplyShopTypeEnum category;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 100, message = "标题长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String title;

    /**
     * 发布内容
     */
    @ApiModelProperty(value = "发布内容")
    @NotBlank(message = "发布内容不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 2000, message = "发布内容长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String publishContent;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @NotBlank(message = "企业名称不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 100, message = "企业名称长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String companyName;

    /**
     * 企业地址
     */
    @ApiModelProperty(value = "企业地址")
    @NotBlank(message = "企业地址不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 100, message = "企业地址长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String location;

    /**
     * 租金
     */
    @ApiModelProperty(value = "租金")
    @NotNull(message = "租金不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private BigDecimal rent;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    @NotBlank(message = "联系人不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 15, message = "企业地址长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String linkMan;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @NotBlank(message = "联系电话不能为空", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    @Length(min = 2, max = 11, message = "联系电话长度必须为2-10位", groups = { BtSupplyShopGroups.Add.class, BtSupplyShopGroups.Update.class })
    private String linkPhone;

    /**
     * 上传时间
     */
    @ApiModelProperty(value = "上传时间")
    private String uploadTime;


    /**
     * 状态 1-待提交 2-待审核 3-已完成
     */
    @ApiModelProperty(value = "状态 1-待提交 2-待审核 3-已完成")
    private BtSupplyShopStatusEnum status;



}
